﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Shop_Phone.COMM;

namespace Shop_Phone.UserControls
{
    public partial class baogia : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                EndUser vcontrol = new EndUser();
                string errMeg = string.Empty;
                rptsanpham.DataSource = vcontrol.getall_sanpham(ref errMeg);
                rptsanpham.DataBind();
            }
        }
        public string tinhtranghang(object trangthai)
        {
            if (Convert.ToInt32(trangthai) > 0)
            {
                return "Còn hàng";
            }
            else
            {
                return "Hết hàng";
            }
        }
    }
}